﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;
using System.Collections.Specialized;

namespace SYHParamter
{
    public class ComapnyNameByIdRequest:DomainRequest<ComapnyNameByIdResponse>
    {
        public int Id { get; set; }

        public ComapnyNameByIdRequest()
            : base()
        {
            P0_Service = "ComapnyNameById";
        }

        public override string Action
        {
            get { return "http://" + Domain + "/ComapnyNameById/Invoke"; }
        }

        public override string ParamaterLinkStr
        {
            get
            {
                StringBuilder returnValue = new StringBuilder();
                returnValue.Append(String.Format(CultureInfo.CurrentCulture, "&Id={0}", Id));
                return returnValue.ToString();
            }
        }

        public override string SignStr
        {
            get
            {
                StringBuilder signBuilder = new StringBuilder();
                signBuilder.Append(P0_Service);
                signBuilder.Append(P1_Project);
                signBuilder.Append(Id);
                return signBuilder.ToString();
            }
        }

        public override string ParamaterInputStr
        {
            get
            {
                StringBuilder returnValue = new StringBuilder();
                returnValue.AppendLine(String.Format(CultureInfo.CurrentCulture, C_InputHtml, "Id", Id));
                return returnValue.ToString();
            }
        }

        protected override NameValueCollection SelfItems
        {
            get
            {
                NameValueCollection returnValue = new NameValueCollection();
                returnValue.Add("Id", Id.ToString());
                return returnValue;
            }
        }
    }
}
